/* InitBloks.java Created on 30/mag/2012 */
package it.tommasocortonesi.scjp.cap4;

/**
 * Classe test per i blocchi di inizializzazione (pag 234).
 *
 * @author 		tommasocortonesi
 * @version 	1.0, 30/mag/2012
 */
public class InitBloks {
	InitBloks(int i) {System.out.println("1-args constructor");}	// static init block runs once, when the class
	InitBloks(){System.out.println("0-arg constructor");}			// is firs.
	static{System.out.println("1st static init block");}			// instance init block runs once every time
	{System.out.println("1st instance init block");}				// a new instance is created, right after the call
	{System.out.println("2nd instance init block");}				// to super() in a constructor
	static{System.out.println("2nd static init block");}	
	
	public static void main(String[] args) {
		new InitBloks();
		new InitBloks(0);
	}

}
